inherited fmRequest_Def: TfmRequest_Def
  Left = 317
  Top = 191
  Width = 1129
  Height = 769
  Caption = 'fmRequest_Def'
  Constraints.MinHeight = 769
  Constraints.MinWidth = 1129
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  inherited sbBottom: TStatusBar
    Top = 708
    Width = 1121
  end
  inherited Panel1: TPanel
    Width = 1121
    inherited BitBtn1: TBitBtn
      Left = 951
    end
    inherited BitBtn2: TBitBtn
      Left = 1039
    end
  end
  object Panel2: TPanel [2]
    Left = 0
    Top = 45
    Width = 561
    Height = 663
    Align = alLeft
    Constraints.MinWidth = 561
    TabOrder = 1
    object ToolBar1: TToolBar
      Left = 1
      Top = 297
      Width = 559
      Height = 29
      ButtonWidth = 26
      Caption = 'ToolBar1'
      Images = DMInv.ilActive
      TabOrder = 0
      object tbAddRD: TToolButton
        Left = 0
        Top = 2
        Hint = #1044#1086#1073#1072#1074#1080#1090#1100' '#1091#1089#1083#1091#1075#1091
        Caption = 'tbAddRD'
        ImageIndex = 28
        ParentShowHint = False
        ShowHint = True
        OnClick = tbAddRDClick
      end
      object tbEdit: TToolButton
        Left = 26
        Top = 2
        Hint = #1056#1077#1076#1072#1082#1090#1080#1088#1086#1074#1072#1085#1080#1077
        Caption = 'tbEdit'
        ImageIndex = 2
        ParentShowHint = False
        ShowHint = True
        OnClick = tbEditClick
      end
      object tbDelR: TToolButton
        Left = 52
        Top = 2
        Hint = #1059#1076#1072#1083#1080#1090#1100' '#1091#1089#1083#1091#1075#1091
        Caption = 'tbDelR'
        ImageIndex = 29
        ParentShowHint = False
        ShowHint = True
        OnClick = tbDelRClick
      end
      object ToolButton1: TToolButton
        Left = 78
        Top = 2
        Width = 8
        Caption = 'ToolButton1'
        ImageIndex = 30
        Style = tbsSeparator
      end
    end
    object dbgRDef: TcxGrid
      Left = 1
      Top = 326
      Width = 559
      Height = 336
      Align = alClient
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
      TabOrder = 1
      LookAndFeel.Kind = lfStandard
      object tvRDef: TcxGridDBTableView
        NavigatorButtons.ConfirmDelete = False
        NavigatorButtons.PriorPage.Visible = True
        NavigatorButtons.Next.Visible = True
        NavigatorButtons.Insert.Visible = True
        NavigatorButtons.Append.Visible = False
        NavigatorButtons.Edit.Visible = False
        NavigatorButtons.Post.Visible = True
        NavigatorButtons.Cancel.Visible = False
        NavigatorButtons.Refresh.Visible = False
        NavigatorButtons.SaveBookmark.Visible = False
        NavigatorButtons.GotoBookmark.Visible = False
        NavigatorButtons.Filter.Visible = False
        FilterBox.Position = fpTop
        OnCellDblClick = tvRDefCellDblClick
        DataController.DataSource = dsRF
        DataController.Summary.DefaultGroupSummaryItems = <
          item
            Format = '#,###0'
            Kind = skSum
            FieldName = 'KVYPLATE'
          end>
        DataController.Summary.FooterSummaryItems = <>
        DataController.Summary.SummaryGroups = <>
        Filtering.ColumnFilteredItemsList = True
        OptionsBehavior.CellHints = True
        OptionsBehavior.IncSearch = True
        OptionsCustomize.ColumnFiltering = False
        OptionsCustomize.ColumnGrouping = False
        OptionsData.CancelOnExit = False
        OptionsData.Deleting = False
        OptionsView.CellEndEllipsis = True
        OptionsView.NoDataToDisplayInfoText = '<'#1053#1077#1090' '#1076#1072#1085#1085#1099#1093'>'
        OptionsView.CellAutoHeight = True
        OptionsView.CellTextMaxLineCount = 1
        OptionsView.ColumnAutoWidth = True
        OptionsView.Footer = True
        OptionsView.GroupByBox = False
        OptionsView.GroupFooters = gfVisibleWhenExpanded
        OptionsView.HeaderEndEllipsis = True
        OptionsView.Indicator = True
        Preview.Visible = True
        Styles.Header = DMInv.cxSiniyText
        object tvRDefSDID: TcxGridDBColumn
          Caption = #1059#1089#1083#1091#1075#1072
          DataBinding.FieldName = 'STNAME'
          PropertiesClassName = 'TcxButtonEditProperties'
          Properties.Buttons = <
            item
              Default = True
              Kind = bkEllipsis
            end>
          Properties.OnButtonClick = tvRDefSDIDPropertiesButtonClick
          Options.Editing = False
          Width = 93
        end
        object tvRDefRDBEGIN: TcxGridDBColumn
          Caption = #1044#1072#1090#1072' '#1085#1072#1095#1072#1083#1072
          DataBinding.FieldName = 'RDBEGIN'
          PropertiesClassName = 'TcxDateEditProperties'
          Options.Editing = False
          Width = 160
        end
        object tvRDefRDEND: TcxGridDBColumn
          Caption = #1044#1072#1090#1072' '#1086#1082#1086#1085#1095#1072#1085#1080#1103
          DataBinding.FieldName = 'RDEND'
          PropertiesClassName = 'TcxDateEditProperties'
          Options.Editing = False
          Width = 201
        end
        object tvRDefRDCOUNT: TcxGridDBColumn
          Caption = #1050#1086#1083#1080#1095#1077#1089#1090#1074#1086
          DataBinding.FieldName = 'RDCOUNT'
          Options.Editing = False
          Width = 149
        end
        object tvRDefRDNOTE: TcxGridDBColumn
          Caption = #1050#1086#1084#1084#1077#1085#1090#1072#1088#1080#1081
          DataBinding.FieldName = 'RDNOTE'
          Width = 67
        end
      end
      object cxGridLevel2: TcxGridLevel
        GridView = tvRDef
      end
    end
    object Panel3: TPanel
      Left = 1
      Top = 1
      Width = 559
      Height = 296
      Align = alTop
      TabOrder = 2
      object Label18: TLabel
        Left = 16
        Top = 12
        Width = 92
        Height = 13
        Caption = #1055#1086#1083#1091#1095#1072#1090#1077#1083#1100' '#1091#1089#1083#1091#1075
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clGray
        Font.Height = -11
        Font.Name = 'Tahoma'
        Font.Style = []
        ParentFont = False
      end
      object Label2: TLabel
        Left = 16
        Top = 179
        Width = 67
        Height = 13
        Caption = #1050#1086#1084#1084#1077#1085#1090#1072#1088#1080#1081
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clGray
        Font.Height = -11
        Font.Name = 'Tahoma'
        Font.Style = []
        ParentFont = False
      end
      object Label3: TLabel
        Left = 16
        Top = 69
        Width = 104
        Height = 13
        Caption = #1044#1072#1090#1072' '#1087#1086#1076#1072#1095#1080' '#1079#1072#1103#1074#1082#1080
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clGray
        Font.Height = -11
        Font.Name = 'Tahoma'
        Font.Style = []
        ParentFont = False
      end
      object Label6: TLabel
        Left = 16
        Top = 124
        Width = 87
        Height = 13
        Caption = #1055#1086#1076#1087#1080#1089#1072#1083' '#1079#1072#1103#1074#1082#1091
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clGray
        Font.Height = -11
        Font.Name = 'Tahoma'
        Font.Style = []
        ParentFont = False
      end
      object lcbPU: TcxDBLookupComboBox
        Left = 15
        Top = 28
        DataBinding.DataField = 'PID_POLUCH'
        DataBinding.DataSource = dlgDS
        ParentFont = False
        Properties.DropDownListStyle = lsEditList
        Properties.DropDownRows = 15
        Properties.KeyFieldNames = 'PID'
        Properties.ListColumns = <
          item
            Caption = #1060#1048#1054
            FieldName = 'PP'
          end
          item
            Caption = #1057#1090#1072#1090#1091#1089
            FieldName = 'SDNAME'
          end
          item
            Caption = #1044#1072#1090#1072' '#1088#1086#1078#1076'.'
            Fixed = True
            FieldName = 'PDATEBIRTH'
          end>
        Properties.ListSource = dsPeople
        Properties.MaxLength = 0
        Properties.OnChange = lcbPUPropertiesChange
        Style.Font.Charset = DEFAULT_CHARSET
        Style.Font.Color = clBlack
        Style.Font.Height = -15
        Style.Font.Name = 'Tahoma'
        Style.Font.Style = []
        Style.Shadow = True
        Style.IsFontAssigned = True
        TabOrder = 0
        OnMouseDown = lcbPUMouseDown
        Width = 538
      end
      object edRDATE: TcxDBDateEdit
        Left = 18
        Top = 86
        DataBinding.DataField = 'RDATE'
        DataBinding.DataSource = dlgDS
        ParentFont = False
        Properties.DateButtons = [btnClear, btnToday]
        Properties.InputKind = ikMask
        Properties.SaveTime = False
        Properties.ShowTime = False
        Properties.WeekNumbers = True
        Style.Font.Charset = DEFAULT_CHARSET
        Style.Font.Color = clWindowText
        Style.Font.Height = -16
        Style.Font.Name = 'Tahoma'
        Style.Font.Style = [fsBold]
        Style.IsFontAssigned = True
        TabOrder = 1
        Width = 127
      end
      object lcbP: TcxDBLookupComboBox
        Left = 15
        Top = 140
        DataBinding.DataField = 'PID'
        DataBinding.DataSource = dlgDS
        ParentFont = False
        Properties.DropDownListStyle = lsEditList
        Properties.DropDownRows = 15
        Properties.KeyFieldNames = 'PID'
        Properties.ListColumns = <
          item
            Caption = #1060#1048#1054
            FieldName = 'PP'
          end
          item
            Caption = #1057#1090#1072#1090#1091#1089
            FieldName = 'SDNAME'
          end
          item
            Caption = #1044#1072#1090#1072' '#1088#1086#1078#1076'.'
            Fixed = True
            FieldName = 'PDATEBIRTH'
          end>
        Properties.ListSource = dsDL
        Properties.MaxLength = 0
        Style.Font.Charset = DEFAULT_CHARSET
        Style.Font.Color = clBlack
        Style.Font.Height = -15
        Style.Font.Name = 'Tahoma'
        Style.Font.Style = []
        Style.Shadow = True
        Style.IsFontAssigned = True
        TabOrder = 2
        OnMouseDown = lcbPUMouseDown
        Width = 538
      end
      object cxDBMemo1: TcxDBMemo
        Left = 16
        Top = 200
        DataBinding.DataField = 'RNOTE'
        DataBinding.DataSource = dlgDS
        ParentFont = False
        Style.Font.Charset = DEFAULT_CHARSET
        Style.Font.Color = clWindowText
        Style.Font.Height = -13
        Style.Font.Name = 'Tahoma'
        Style.Font.Style = []
        Style.Shadow = True
        Style.IsFontAssigned = True
        TabOrder = 3
        Height = 73
        Width = 534
      end
      object lOsnPodr: TcxLabel
        Left = 232
        Top = 88
        Caption = 'lOsnPodr'
        ParentFont = False
        Style.Font.Charset = DEFAULT_CHARSET
        Style.Font.Color = clGreen
        Style.Font.Height = -16
        Style.Font.Name = 'Tahoma'
        Style.Font.Style = [fsBold]
        Style.IsFontAssigned = True
      end
    end
  end
  object cxSplitter1: TcxSplitter [3]
    Left = 561
    Top = 45
    Width = 8
    Height = 663
    HotZoneClassName = 'TcxMediaPlayer9Style'
    Control = Panel2
  end
  object pc: TcxPageControl [4]
    Left = 569
    Top = 45
    Width = 552
    Height = 663
    ActivePage = cxTabSheet1
    Align = alClient
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -13
    Font.Name = 'Tahoma'
    Font.Style = []
    ParentFont = False
    TabOrder = 4
    ClientRectBottom = 662
    ClientRectLeft = 1
    ClientRectRight = 551
    ClientRectTop = 24
    object cxTabSheet1: TcxTabSheet
      Caption = #1055#1077#1088#1074#1080#1095#1085#1086#1077' '#1079#1072#1103#1074#1083#1077#1085#1080#1077
      ImageIndex = 0
      object bFromFile: TcxButton
        Left = 0
        Top = 0
        Width = 550
        Height = 25
        Caption = #1044#1086#1073#1072#1074#1080#1090#1100'/'#1080#1079#1084#1077#1085#1080#1090#1100' '#1087#1077#1088#1074#1080#1095#1085#1086#1077
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -13
        Font.Name = 'Tahoma'
        Font.Style = [fsBold]
        ParentFont = False
        TabOrder = 0
        OnClick = bFromFileClick
        Align = alTop
        Glyph.Data = {
          76010000424D7601000000000000760000002800000020000000100000000100
          04000000000000010000CE0E0000D80E00001000000000000000000000000000
          80000080000000808000800000008000800080800000C0C0C000808080000000
          FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
          3333333333387F3333333333333333333333333333387F333333333333344333
          3333333333387F3333333333333443333333333333387F333333333333344333
          3333333333387F3333333333333443333333333333387F333333333333344333
          3333387FFFFFFFFFFFFF3344444444444433387777777F777777334444444444
          4433388888887F8888883333333443333333333333387F333333333333344333
          3333333333387F3333333333333443333333333333387F333333333333344333
          3333333333387F33333333333334433333333333333877333333333333333333
          3333333333388833333333333333333333333333333333333333}
        NumGlyphs = 2
      end
      object PdfViewer1: TPdfViewer
        Left = 0
        Top = 25
        Width = 550
        Height = 613
        Align = alClient
        About = 'Synactis PDF Viewer version 1.0'
        AutoOpen = True
        Copies = 1
        EndPage = 0
        FitMode = vmFitBoxHorz
        LayoutMode = lmDontCare
        PageMode = pmStandard
        ShowPrintDialog = True
        ShowScrollBars = True
        ShowToolBar = True
        ShrinkToMargins = True
        StartPage = 1
      end
    end
    object cxTabSheet2: TcxTabSheet
      Caption = #1056#1077#1075#1080#1089#1090#1088#1072#1094#1080#1086#1085#1085#1086#1077' '#1079#1072#1103#1074#1083#1077#1085#1080#1077
      ImageIndex = 1
      object cxButton1: TcxButton
        Left = 0
        Top = 0
        Width = 550
        Height = 25
        Caption = #1044#1086#1073#1072#1074#1080#1090#1100'/'#1080#1079#1084#1077#1085#1080#1090#1100' '#1088#1077#1075#1080#1089#1090#1088#1072#1094#1080#1086#1085#1085#1086#1077
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -13
        Font.Name = 'Tahoma'
        Font.Style = [fsBold]
        ParentFont = False
        TabOrder = 0
        OnClick = cxButton1Click
        Align = alTop
        Glyph.Data = {
          76010000424D7601000000000000760000002800000020000000100000000100
          04000000000000010000CE0E0000D80E00001000000000000000000000000000
          80000080000000808000800000008000800080800000C0C0C000808080000000
          FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
          3333333333387F3333333333333333333333333333387F333333333333344333
          3333333333387F3333333333333443333333333333387F333333333333344333
          3333333333387F3333333333333443333333333333387F333333333333344333
          3333387FFFFFFFFFFFFF3344444444444433387777777F777777334444444444
          4433388888887F8888883333333443333333333333387F333333333333344333
          3333333333387F3333333333333443333333333333387F333333333333344333
          3333333333387F33333333333334433333333333333877333333333333333333
          3333333333388833333333333333333333333333333333333333}
        NumGlyphs = 2
      end
      object PdfViewer2: TPdfViewer
        Left = 0
        Top = 25
        Width = 550
        Height = 613
        Align = alClient
        About = 'Synactis PDF Viewer version 1.0'
        AutoOpen = True
        Copies = 1
        EndPage = 0
        FitMode = vmFitBoxHorz
        LayoutMode = lmDontCare
        PageMode = pmStandard
        ShowPrintDialog = True
        ShowScrollBars = True
        ShowToolBar = True
        ShrinkToMargins = True
        StartPage = 1
      end
    end
  end
  inherited dlgDS: TDataSource
    DataSet = qR
    Top = 8
  end
  object qR: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    CachedUpdates = True
    SQL.Strings = (
      'select * from request where rid = :rid')
    UpdateObject = quR
    GeneratorField.Field = 'RID'
    GeneratorField.Generator = 'GEN_REQUEST_ID'
    Left = 296
    Top = 8
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'rid'
        ParamType = ptUnknown
      end>
    object qRRID: TIntegerField
      FieldName = 'RID'
      Origin = '"REQUEST"."RID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qRPID_POLUCH: TIntegerField
      FieldName = 'PID_POLUCH'
      Origin = '"REQUEST"."PID_POLUCH"'
    end
    object qRPID: TIntegerField
      FieldName = 'PID'
      Origin = '"REQUEST"."PID"'
    end
    object qRRUSERENTER: TIBStringField
      FieldName = 'RUSERENTER'
      Origin = '"REQUEST"."RUSERENTER"'
      Size = 40
    end
    object qRRTIMEENTER: TDateTimeField
      FieldName = 'RTIMEENTER'
      Origin = '"REQUEST"."RTIMEENTER"'
    end
    object qRRUSEREDIT: TIBStringField
      FieldName = 'RUSEREDIT'
      Origin = '"REQUEST"."RUSEREDIT"'
      Size = 40
    end
    object qRRTIMEEDIT: TDateTimeField
      FieldName = 'RTIMEEDIT'
      Origin = '"REQUEST"."RTIMEEDIT"'
    end
    object qRRNOTE: TIBStringField
      FieldName = 'RNOTE'
      Origin = '"REQUEST"."RNOTE"'
      Size = 255
    end
    object qRRDATE: TDateField
      FieldName = 'RDATE'
      Origin = '"REQUEST"."RDATE"'
    end
    object qRRISDELETE: TIntegerField
      FieldName = 'RISDELETE'
      Origin = '"REQUEST"."RISDELETE"'
    end
  end
  object quR: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  RID,'
      '  PID_POLUCH,'
      '  PID,'
      '  RUSERENTER,'
      '  RTIMEENTER,'
      '  RUSEREDIT,'
      '  RTIMEEDIT,'
      '  RNOTE,'
      '  RDATE,'
      '  RISDELETE'
      'from request '
      'where'
      '  RID = :RID')
    ModifySQL.Strings = (
      'update request'
      'set'
      '  PID = :PID,'
      '  PID_POLUCH = :PID_POLUCH,'
      '  RDATE = :RDATE,'
      '  RID = :RID,'
      '  RNOTE = :RNOTE'
      'where'
      '  RID = :OLD_RID')
    InsertSQL.Strings = (
      'insert into request'
      '  (PID, PID_POLUCH, RDATE, RID, RNOTE)'
      'values'
      '  (:PID, :PID_POLUCH, :RDATE, :RID, :RNOTE)')
    DeleteSQL.Strings = (
      'delete from request'
      'where'
      '  RID = :OLD_RID')
    Left = 336
    Top = 8
  end
  object dsRF: TDataSource
    DataSet = qRF
    Left = 224
    Top = 464
  end
  object dsPeople: TDataSource
    DataSet = qPeople1
    Left = 400
    Top = 102
  end
  object qPeople1: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      
        'SELECT P.PID, (COALESCE(P.PLASTNAME,'#39' '#39')||'#39' '#39'||COALESCE(P.PNAME,' +
        #39' '#39')||'#39' '#39'||COALESCE(P.PPATRONYMIC,'#39' '#39')) AS PP,'
      '    SD.SDNAME, PS.SDID, PDATEBIRTH, SD1.SDNAME AS podr'
      'FROM PEOPLE P'
      'INNER JOIN P_STATUS PS ON PS.PID = P.PID'
      'INNER JOIN SYS_DIC SD ON SD.SDID = PS.SDID'
      
        'LEFT OUTER JOIN DETI_PODRAZD DP ON DP.PID = P.PID AND CURRENT_DA' +
        'TE BETWEEN CAST(dp.DPDATEIN AS DATE) AND COALESCE(CAST(dp.DPDATE' +
        'OUT AS DATE), CURRENT_DATE+3650)'
      'LEFT OUTER JOIN SYS_DIC SD1 ON SD1.SDID = DP.SDID'
      'WHERE P.PISDELETE IS NULL and PS.sdid = 1246 '
      'ORDER BY 3, 2')
    Left = 432
    Top = 102
    object qPeople1PID: TIntegerField
      FieldName = 'PID'
      Origin = '"PEOPLE"."PID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qPeople1PP: TIBStringField
      FieldName = 'PP'
      ProviderFlags = []
      Size = 767
    end
    object qPeople1SDNAME: TIBStringField
      FieldName = 'SDNAME'
      Origin = '"SYS_DIC"."SDNAME"'
      Size = 255
    end
    object qPeople1SDID: TIntegerField
      FieldName = 'SDID'
      Origin = '"P_STATUS"."SDID"'
    end
    object qPeople1PDATEBIRTH: TDateField
      FieldName = 'PDATEBIRTH'
      Origin = '"PEOPLE"."PDATEBIRTH"'
    end
    object qPeople1PODR: TIBStringField
      FieldName = 'PODR'
      Origin = '"SYS_DIC"."SDNAME"'
      Size = 255
    end
  end
  object dsDL: TDataSource
    DataSet = qDL
    Left = 416
    Top = 198
  end
  object qDL: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      
        'SELECT P.PID, (COALESCE(P.PLASTNAME,'#39' '#39')||'#39' '#39'||COALESCE(P.PNAME,' +
        #39' '#39')||'#39' '#39'||COALESCE(P.PPATRONYMIC,'#39' '#39')) AS PP,'
      '    SD.SDNAME, PS.SDID, PDATEBIRTH'
      'FROM PEOPLE P'
      'INNER JOIN P_STATUS PS ON PS.PID = P.PID'
      'INNER JOIN SYS_DIC SD ON SD.SDID = PS.SDID'
      ''
      'WHERE P.PISDELETE IS NULL and PS.sdid <> 1246'
      ' '
      'ORDER BY 3, 2')
    Left = 456
    Top = 198
    object qDLPID: TIntegerField
      FieldName = 'PID'
      Origin = '"PEOPLE"."PID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qDLPP: TIBStringField
      FieldName = 'PP'
      ProviderFlags = []
      Size = 767
    end
    object qDLSDNAME: TIBStringField
      FieldName = 'SDNAME'
      Origin = '"SYS_DIC"."SDNAME"'
      Size = 255
    end
    object qDLSDID: TIntegerField
      FieldName = 'SDID'
      Origin = '"P_STATUS"."SDID"'
    end
    object qDLPDATEBIRTH: TDateField
      FieldName = 'PDATEBIRTH'
      Origin = '"PEOPLE"."PDATEBIRTH"'
    end
  end
  object qRF: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    AfterInsert = qRFAfterInsert
    CachedUpdates = True
    DataSource = dlgDS
    SQL.Strings = (
      'select rd.*, st.stname, st.STTYPE, st.STPODR, st.STISARCHIVE'
      'from request_def rd'
      'INNER JOIN Services_type St ON St.StID = rd.StID'
      'where rd.rid = :rid')
    UpdateObject = quRF
    GeneratorField.Field = 'RDID'
    GeneratorField.Generator = 'GEN_REQUEST_DEF_ID'
    Left = 264
    Top = 461
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'rid'
        ParamType = ptUnknown
      end>
    object qRFRDID: TIntegerField
      FieldName = 'RDID'
      Origin = '"REQUEST_DEF"."RDID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qRFRID: TIntegerField
      FieldName = 'RID'
      Origin = '"REQUEST_DEF"."RID"'
    end
    object qRFRDNOTE: TIBStringField
      FieldName = 'RDNOTE'
      Origin = '"REQUEST_DEF"."RDNOTE"'
      Size = 255
    end
    object qRFRDBEGIN: TDateField
      FieldName = 'RDBEGIN'
      Origin = '"REQUEST_DEF"."RDBEGIN"'
    end
    object qRFRDEND: TDateField
      FieldName = 'RDEND'
      Origin = '"REQUEST_DEF"."RDEND"'
    end
    object qRFRDCOUNT: TIntegerField
      FieldName = 'RDCOUNT'
      Origin = '"REQUEST_DEF"."RDCOUNT"'
    end
    object qRFSTID: TIntegerField
      FieldName = 'STID'
      Origin = '"REQUEST_DEF"."STID"'
    end
    object qRFSTNAME: TIBStringField
      FieldName = 'STNAME'
      Origin = '"SERVICES_TYPE"."STNAME"'
      Size = 255
    end
    object qRFSTTYPE: TIntegerField
      FieldName = 'STTYPE'
      Origin = '"SERVICES_TYPE"."STTYPE"'
    end
    object qRFSTPODR: TIBStringField
      FieldName = 'STPODR'
      Origin = '"SERVICES_TYPE"."STPODR"'
    end
    object qRFSTISARCHIVE: TIntegerField
      FieldName = 'STISARCHIVE'
      Origin = '"SERVICES_TYPE"."STISARCHIVE"'
    end
  end
  object quRF: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  RDID,'
      '  RID,'
      '  SCID,'
      '  RDUSERENTER,'
      '  RDTIMEENTER,'
      '  RDUSEREDIT,'
      '  RDTIMEEDIT,'
      '  RDNOTE,'
      '  RDBEGIN,'
      '  RDEND,'
      '  RDCOUNT,'
      '  RDISOTKAZ,'
      '  STID,'
      '  STNAME'
      'from request_def '
      'where'
      '  RDID = :RDID')
    ModifySQL.Strings = (
      'update request_def'
      'set'
      '  RDBEGIN = :RDBEGIN,'
      '  RDCOUNT = :RDCOUNT,'
      '  RDEND = :RDEND,'
      '  RDID = :RDID,'
      '  RDNOTE = :RDNOTE,'
      '  RID = :RID,'
      '  STID = :STID'
      'where'
      '  RDID = :OLD_RDID')
    InsertSQL.Strings = (
      'insert into request_def'
      '  (RDBEGIN, RDCOUNT, RDEND, RDID, RDNOTE, RID, STID)'
      'values'
      '  (:RDBEGIN, :RDCOUNT, :RDEND, :RDID, :RDNOTE, :RID, :STID)')
    DeleteSQL.Strings = (
      'delete from request_def'
      'where'
      '  RDID = :OLD_RDID')
    Left = 304
    Top = 461
  end
  object qRScan: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    AfterInsert = qRScanAfterInsert
    CachedUpdates = True
    DataSource = dlgDS
    SQL.Strings = (
      'select * from request_scan where rid = :rid and rstype = 1')
    UpdateObject = quRScan
    Left = 666
    Top = 190
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'rid'
        ParamType = ptUnknown
      end>
    object qRScanRID: TIntegerField
      FieldName = 'RID'
      Origin = '"REQUEST_SCAN"."RID"'
    end
    object qRScanRSFILE: TBlobField
      FieldName = 'RSFILE'
      Origin = '"REQUEST_SCAN"."RSFILE"'
      ProviderFlags = [pfInUpdate]
      Size = 8
    end
    object qRScanRSTYPE: TIntegerField
      FieldName = 'RSTYPE'
      Origin = '"REQUEST_SCAN"."RSTYPE"'
    end
  end
  object quRScan: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  RID,'
      '  RSFILE,'
      '  RSTYPE'
      'from request_scan '
      'where'
      '  RID = :RID and'
      '  RSTYPE = 1')
    ModifySQL.Strings = (
      'update request_scan'
      'set'
      '  RID = :RID,'
      '  RSFILE = :RSFILE,'
      '  RSTYPE = :RSTYPE'
      'where'
      '  RID = :OLD_RID and'
      '  RSTYPE = 1')
    InsertSQL.Strings = (
      'insert into request_scan'
      '  (RID, RSFILE, RSTYPE)'
      'values'
      '  (:RID, :RSFILE, 1)')
    DeleteSQL.Strings = (
      'delete from request_scan'
      'where'
      '  RID = :OLD_RID and'
      '  RSTYPE = 1')
    Left = 706
    Top = 190
  end
  object odScan: TOpenDialog
    Filter = 'PDF|*.pdf'
    InitialDir = 'c:\'
    Left = 664
    Top = 232
  end
  object qRScan2: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    AfterInsert = qRScan2AfterInsert
    CachedUpdates = True
    DataSource = dlgDS
    SQL.Strings = (
      'select * from request_scan where rid = :rid and rstype = 2')
    UpdateObject = quRScan2
    Left = 666
    Top = 150
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'rid'
        ParamType = ptUnknown
      end>
    object qRScan2RID: TIntegerField
      FieldName = 'RID'
      Origin = '"REQUEST_SCAN"."RID"'
    end
    object qRScan2RSFILE: TBlobField
      FieldName = 'RSFILE'
      Origin = '"REQUEST_SCAN"."RSFILE"'
      ProviderFlags = [pfInUpdate]
      Size = 8
    end
    object qRScan2RSTYPE: TIntegerField
      FieldName = 'RSTYPE'
      Origin = '"REQUEST_SCAN"."RSTYPE"'
    end
  end
  object quRScan2: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  RID,'
      '  RSFILE,'
      '  RSTYPE'
      'from request_scan '
      'where'
      '  RID = :RID and'
      '  RSTYPE = 2')
    ModifySQL.Strings = (
      'update request_scan'
      'set'
      '  RID = :RID,'
      '  RSFILE = :RSFILE,'
      '  RSTYPE = :RSTYPE'
      'where'
      '  RID = :OLD_RID and'
      '  RSTYPE = 2')
    InsertSQL.Strings = (
      'insert into request_scan'
      '  (RID, RSFILE, RSTYPE)'
      'values'
      '  (:RID, :RSFILE, 2)')
    DeleteSQL.Strings = (
      'delete from request_scan'
      'where'
      '  RID = :OLD_RID and'
      '  RSTYPE = 2')
    Left = 706
    Top = 150
  end
  object cxPropertiesStore1: TcxPropertiesStore
    Components = <
      item
        Component = dbgRDef
        Properties.Strings = (
          'Align'
          'Anchors'
          'BevelEdges'
          'BevelInner'
          'BevelKind'
          'BevelOuter'
          'BevelWidth'
          'BorderStyle'
          'BorderWidth'
          'Constraints'
          'Cursor'
          'DragCursor'
          'DragKind'
          'DragMode'
          'DragOpening'
          'DragOpeningWaitTime'
          'Enabled'
          'Font'
          'Height'
          'HelpContext'
          'HelpKeyword'
          'HelpType'
          'Hint'
          'Left'
          'LevelTabs'
          'LookAndFeel'
          'Name'
          'ParentFont'
          'PopupMenu'
          'RootLevelOptions'
          'RootLevelStyles'
          'TabOrder'
          'TabStop'
          'Tag'
          'Top'
          'Visible'
          'Width')
      end
      item
        Component = odScan
        Properties.Strings = (
          'FileName')
      end
      item
        Component = Panel2
        Properties.Strings = (
          'Height'
          'Left'
          'Top'
          'Width')
      end
      item
        Component = pc
        Properties.Strings = (
          'Height'
          'Left'
          'Top'
          'Width')
      end
      item
        Component = tvRDef
        Properties.Strings = (
          'BackgroundBitmaps'
          'DataController'
          'DateTimeHandling'
          'DragMode'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FilterBox'
          'Filtering'
          'FilterRow'
          'Name'
          'NavigatorButtons'
          'NewItemRow'
          'OptionsBehavior'
          'OptionsCustomize'
          'OptionsData'
          'OptionsSelection'
          'OptionsView'
          'PopupMenu'
          'Preview'
          'Styles'
          'Synchronization'
          'Tag')
      end
      item
        Component = tvRDefRDBEGIN
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = tvRDefRDCOUNT
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = tvRDefRDEND
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = tvRDefRDNOTE
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = tvRDefSDID
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end>
    StorageName = 'PS_fmRequest_Def'
    StorageType = stRegistry
    Left = 610
    Top = 150
  end
end
